<?php

namespace app\dao\setting\admin;

use app\dao\BaseDao;
use app\model\setting\admin\SystemWebsite;

class SystemWebsiteDao extends BaseDao
{

    public function index(array $where)
    {
        return $this ->getModel() -> paginate($where['pageSize']);
    }

    public function create(array $where)
    {
        return $this -> search() -> create($where);
    }

    public function updateDao(array $where)
    {
        return $this -> search() ->update($where);
    }

    public function deleteDao(array $where)
    {
        return $this -> search() -> destroy($where);
    }


    protected function setModel(): string
    {
        return SystemWebsite::class;
    }
}